﻿/*********************************************************************
 * CopyRight (c) 2009-2014 HangJing Teconology. All Rights Reserved.
 * FileName : 
 * Function : 
 * Created by jijunjian at 2014-08-13 22:43:49.
 * E-Mail   : jijunjian@ihangjing.com
*********************************************************************/
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;


namespace Hangjing.JobServer
{
    /// <summary>
    /// 工具类
    /// </summary>
    public class Utils
    {
        public static void ParseUrl(string paramsstr, out NameValueCollection nvc)
        {
            nvc = HttpUtility.ParseQueryString(paramsstr);
        }

        /// <summary>
        /// 字符串转成utf8
        /// </summary>
        /// <param name="oldstr"></param>
        /// <returns></returns>
        public static string ToUTF8(string oldstr)
        {
            byte[] btCN = System.Text.Encoding.Default.GetBytes(oldstr);
            string strUTF8 = System.Text.Encoding.UTF8.GetString(btCN);

            return strUTF8;
        }

    }
}
